package cn.tedu.shoot;

import java.awt.image.BufferedImage;

public class Bulletleft extends Bullet {
    private int xSpeed;
    private int ySpeed;
    public Bulletleft(int x, int y) {
        super(x, y);
        xSpeed = 1;
        ySpeed = 3;
    }
    public void step() {
        y -= ySpeed;
        x -= xSpeed;
    }
    public BufferedImage getImage() {
        if(isLive()) {
            return Images.bullet;
        }else {
            state = REMOVE;
        }
        return null;
    }
    public boolean isOutOfBounds() {
        return y <= -height || x<=-width-this.x;
    }
}
